<?php

/**
 * Model for eqtech-hotelbooking Component
 * 
 * @package    eqtech-hotelbooking joomla
 * @subpackage Components
 * @link 
 * @license        GNU/GPL
 */
 
// Check to ensure this file is included in Joomla!
defined('_JEXEC') or die();
 
jimport( 'joomla.application.component.model' );
/**
 * 
 *
 * @package    eqtech-hotelbooking joomla
 * @subpackage Components
 */
 
class HbModelCruds extends JModel
{
   
    public $_data;
	public $table_name='hbtb_country';
	 
	public function setTable_name()
    {
       // $this->table_name=$tname;
    }
	
	protected function getTable_name()
    {
        return $this->table_name;
    }
	
    protected function _buildQuery()
    {
        $query = ' SELECT * '. ' FROM '.$this->table_name;
        return $query;
    }
 
    /**
     * Retrieves the hello data
     * @return array Array of objects containing the data from the database
     */
    public function getData()
    {
        // Lets load the data if it doesn't already exist
        if (empty( $this->_data ))
        {
            $query = $this->_buildQuery();
            $this->_data = $this->_getList( $query );
        }
 
        return $this->_data;
    }
}